/*
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use 'sass:map';
@use '@angular/material' as mat;
@use '@gravitee/ui-particles-angular' as gio;
@use '../../../scss/gio-layout' as gio-layout;

$typography: map.get(gio.$mat-theme, typography);

:host {
  @include gio-layout.gio-responsive-content-container;
}

.integrations-overview {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  &__page-title {
    @include mat.typography-level($typography, headline-6);
    margin: 0 0 4px 0;
  }

  &__description {
    color: mat.get-color-from-palette(gio.$mat-space-palette, 'lighter40');
  }
}

.card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;

  &__title {
    display: flex;
    flex-direction: column;
    justify-content: center;

    h3 {
      @include mat.typography-level($typography, subtitle-1);
      margin: 0;
    }

    .description {
      color: mat.get-color-from-palette(gio.$mat-space-palette, 'lighter40');
      margin-bottom: 0;
    }
  }
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;

  .mat-mdc-card {
    padding: 20px;
    border: 1px solid mat.get-color-from-palette(gio.$mat-dove-palette, 'darker10');
    box-shadow: 0 2px 4px 0 mat.get-color-from-palette(gio.$mat-dove-palette, 'darker20');
  }
}

.details-card {
  display: flex;
  flex-direction: row;
  gap: 20px;

  .title {
    margin-bottom: 8px;
  }

  .gio-badge-error,
  .gio-badge-neutral {
    margin-left: 0;
  }

  .icon-left {
    margin-right: 4px;
  }

  .logo {
    margin-right: 8px;
  }

  .border-right {
    padding-right: 20px;
    border-right: 1px solid mat.get-color-from-palette(gio.$mat-dove-palette, 'darker20');
  }
}

.no-integrations {
  padding: 16px 0;
  &__img {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    height: 72px;
  }

  &__message {
    display: flex;
    flex-direction: column;

    .header {
      @include mat.typography-level($typography, 'headline-6');
      align-self: center;
      margin-bottom: 12px;
    }

    .description {
      color: mat.get-color-from-palette(gio.$mat-space-palette, 'lighter40');
      @include mat.typography-level($typography, body-2);
      width: 400px;
      align-self: center;
      text-align: center;
      margin-bottom: 0;
    }
  }
}

gio-banner-error {
  margin: 0;
}

.body-strong {
  @include mat.typography-level($typography, body-1);
}

.background-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: mat.get-color-from-palette(gio.$mat-primary-palette, 'lighter80');
}

.loadingTemplate {
  height: 50vh;
  display: flex;
}

.id-badge {
  text-transform: none;
}

gio-table-wrapper {
  margin-top: 0;
}

.mat-column-actions {
  flex: none;
  width: 132px;
}

.separator-hr {
  margin-top: 16px;
  height: 1px;
  background-color: mat.get-color-from-palette(gio.$mat-dove-palette, 'darker20');
}
